package com.hey.baseapplication.api;

import com.hey.baseapplication.bean.Event;
import com.hey.baseapplication.bean.EventApi;
import com.hey.baseapplication.bean.Response;
import com.hey.baseapplication.bean.User;

import java.util.List;

import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by Hey on 16/12/15.
 */

public interface ApiService {
    String ACCESS_TOKEN = "95d4a66cbf3e0231edb79c52e04538fc";
//    @FormUrlEncoded
//    @POST("login.php")
//    Call<Response<User>> login(@Field("access_token") String token, @Field("mobile")String username, @Field("password") String password, @Field("mobile_type") int type);


    @FormUrlEncoded
    @POST("login.php")
    Observable<Response<User>> login(@Field("access_token") String token, @Field("mobile")String username, @Field("password") String password, @Field("mobile_type") int type);

    @FormUrlEncoded
    @POST("find.php")
    Observable<Response<List<Event>>>  getEventList(@Field("access_token") String token,@Field("is_all") String  is_all);
}
